app.controller("baseController",function ($scope) {



    $scope.reloadList=function () {
        $scope.search( $scope.paginationConf.currentPage, $scope.paginationConf.itemsPerPage);
    }
    $scope.paginationConf = {
        currentPage: 1,
        totalItems: 10,
        itemsPerPage: 10,
        perPageOptions: [10, 20, 30, 40, 50],
        onChange: function(){

            $scope.reloadList();//重新加载
        }
    };

    $scope.ids=[];
    $scope.updateSelection=function ($event,id) {
        //判断是否被选中
        if($event.target.checked){
            //被选中的就push到数组中
            $scope.ids.push(id);
        }else{
            //如果不选中就要在数组中清除
            var s=$scope.ids.indexOf(id);
            $scope.ids.splice(s,1);
        }

    }
})


